package utils

import "time"

type MysqlConf struct {
	Host        string
	User        string
	Passwd      string
	Port        int64
	DB          string
	MaxIdleCons int
	MaxOpenCons int
	MaxLifetime time.Time
}

type Server struct {
	Addr string
}

type EmailConf struct {
	Host       string
	Port 	   int64
	User       string
	Password   string
}

func MysqlConfInit() *MysqlConf {
	instance := new(MysqlConf)
	instance.Host = "172.21.8.156"
	//instance.Host = "127.0.0.1"
	instance.User = "root"
	instance.Passwd = "ZjhWEU5DyViVXap4Ur"
	//instance.Passwd = "384648858"
	instance.Port = 3306
	instance.DB = "db_website"
	instance.MaxIdleCons = 100
	instance.MaxOpenCons = 1000
	return instance
}

func ServerConfInit() *Server {
	instance := new(Server)
	instance.Addr = ":8000"
	return instance
}

func EmailConfInit() *EmailConf {
	instance := new(EmailConf)
	instance.Host = "smtpdm.aliyun.com"
	instance.Port = 465
	instance.User = "support@mail.arche-capital.com"
	instance.Password = "uQSSBWf0FUC12RiVKPlY"
	return instance
}
